package queue;

public class Main {
	public static void main(String args[]) {
		System.out.println("循环队列操作:");
		SeqQueue<Integer> seqQueue = new SeqQueue<Integer>(5);
		seqQueue.enQueue(new Integer(10));
		seqQueue.enQueue(new Integer(20));
		seqQueue.toString();
		seqQueue.deQueue();
		seqQueue.deQueue();
		seqQueue.toString();
		seqQueue.enQueue(new Integer(30));
		seqQueue.enQueue(new Integer(40));
		seqQueue.enQueue(new Integer(50));
		seqQueue.enQueue(new Integer(60));
		seqQueue.toString();
		seqQueue.enQueue(new Integer(70));
		seqQueue.toString();

		System.out.println("\n链式队列操作:");
		LinkedQueue<Integer> linkedQueue = new LinkedQueue<Integer>();
		for (int i = 1; i <= 5; i++) {
			Integer intobj = new Integer(i);
			linkedQueue.enQueue(intobj);
		}
		linkedQueue.toString();

		while (!linkedQueue.isEmpty()) {
			linkedQueue.deQueue();
		}
		linkedQueue.toString();
	}
}
